package com.ruoyi.fun.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fun.mapper.EcLogisticsCompanyMapper;
import com.ruoyi.fun.domain.EcLogisticsCompany;
import com.ruoyi.fun.service.IEcLogisticsCompanyService;

/**
 * 物流公司Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-27
 */
@Service
public class EcLogisticsCompanyServiceImpl implements IEcLogisticsCompanyService 
{
    @Autowired
    private EcLogisticsCompanyMapper ecLogisticsCompanyMapper;

    /**
     * 查询物流公司
     * 
     * @param id 物流公司主键
     * @return 物流公司
     */
    @Override
    public EcLogisticsCompany selectEcLogisticsCompanyById(Long id)
    {
        return ecLogisticsCompanyMapper.selectEcLogisticsCompanyById(id);
    }

    /**
     * 查询物流公司列表
     * 
     * @param ecLogisticsCompany 物流公司
     * @return 物流公司
     */
    @Override
    public List<EcLogisticsCompany> selectEcLogisticsCompanyList(EcLogisticsCompany ecLogisticsCompany)
    {
        return ecLogisticsCompanyMapper.selectEcLogisticsCompanyList(ecLogisticsCompany);
    }

    /**
     * 新增物流公司
     * 
     * @param ecLogisticsCompany 物流公司
     * @return 结果
     */
    @Override
    public int insertEcLogisticsCompany(EcLogisticsCompany ecLogisticsCompany)
    {
        ecLogisticsCompany.setCreateTime(DateUtils.getNowDate());
        return ecLogisticsCompanyMapper.insertEcLogisticsCompany(ecLogisticsCompany);
    }

    /**
     * 修改物流公司
     * 
     * @param ecLogisticsCompany 物流公司
     * @return 结果
     */
    @Override
    public int updateEcLogisticsCompany(EcLogisticsCompany ecLogisticsCompany)
    {
        ecLogisticsCompany.setUpdateTime(DateUtils.getNowDate());
        return ecLogisticsCompanyMapper.updateEcLogisticsCompany(ecLogisticsCompany);
    }

    /**
     * 批量删除物流公司
     * 
     * @param ids 需要删除的物流公司主键
     * @return 结果
     */
    @Override
    public int deleteEcLogisticsCompanyByIds(Long[] ids)
    {
        return ecLogisticsCompanyMapper.deleteEcLogisticsCompanyByIds(ids);
    }

    /**
     * 删除物流公司信息
     * 
     * @param id 物流公司主键
     * @return 结果
     */
    @Override
    public int deleteEcLogisticsCompanyById(Long id)
    {
        return ecLogisticsCompanyMapper.deleteEcLogisticsCompanyById(id);
    }
}
